package study;

import java.util.Arrays;

public class IntegerConvert {
    public static void main(String[] args) {
//        int a = Integer.parseInt("0001");
//        System.out.println(Integer.parseInt("0001"));
//        System.out.println(10001+Integer.parseInt("0001"));
//        System.out.println(10001+0);
//        System.out.println(a+10001);
//        String b = "B7P83P00011120";
//        System.out.println(b.substring(6,10));
//        System.out.println(String.valueOf(a+10001).substring(1));
        String downloadData="###PJXX_BEGIN###\n0546010@21@53@2@2@5A@356@6E@\n0874349@21@53@1@1@04@356@61@\n###PJXX_END###\n###LXGZ_BEGIN###\n2013-03-12 12:01:13@2013-03-12 00:00:00@6035@04@C62BK@4601672@01010060301060@6-6@82@@1@151@\n2014-01-13 14:59:51@2014-01-13 00:00:00@5692@04@C62BK@4624438@01010060309017@0@@@2@152@\n###LXGZ_END###";
        String[] strings = downloadData.split("\n");
//        System.out.println(Arrays.toString(strings));
//        System.out.println(strings[0]);
        boolean is_pjxx = false;
        boolean is_lxgz = false;
        for(String s:strings){
            switch (s){
                case "###PJXX_BEGIN###":
                    is_pjxx = true;
                    break;
                case "###PJXX_END###":
                    is_pjxx = false;
                    break;
                case "###LXGZ_BEGIN###":
                    is_lxgz = true;
                    break;
                case "###LXGZ_END###":
                    is_lxgz= false;
                    break;
            }
            String[] sp = s.split("@");
            System.out.println(Arrays.toString(sp));
            if(is_pjxx){

                if(sp.length>2){

                }
            }
        }
    }
}
